import Vue from 'vue'
import Vuex from 'vuex'
import login from './modules/login'
import user from './modules/user'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    login,
    user
  },
  getters: {
    // 建立对模块的快捷访问
    dkd_token: state => state.login.dkd_token, // token
    dkd_userId: state => state.login.dkd_userId, // userid
    userInfo: state => state.user.baseInfo // 用户信息
  }
}

)
